#![allow(unused_qualifications)]

use validator::Validate;

use crate::models;
#[cfg(any(feature = "client", feature = "server"))]
use crate::header;

#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct BugInfo {
    /// 缺陷ID
    #[serde(rename = "bugId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub bug_id: Option<String>,

    /// 标题
    #[serde(rename = "title")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub title: Option<String>,

    /// 状态
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "state")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub state: Option<String>,

    /// 创建人ID
    #[serde(rename = "createUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_user_id: Option<String>,

    /// 创建人名称
    #[serde(rename = "createDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_display_name: Option<String>,

    /// 执行人ID
    #[serde(rename = "execUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_user_id: Option<String>,

    /// 执行人名称
    #[serde(rename = "execDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_display_name: Option<String>,

    /// 检查人ID
    #[serde(rename = "checkUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_user_id: Option<String>,

    /// 检查人名称
    #[serde(rename = "checkDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_display_name: Option<String>,

    /// 执行奖励
    #[serde(rename = "execAwardPoint")]
    #[validate(
            range(min = 0),
        )]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_award_point: Option<u32>,

    /// 检查奖励
    #[serde(rename = "checkAwardPoint")]
    #[validate(
            range(min = 0),
        )]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_award_point: Option<u32>,

    /// 创建时间
    #[serde(rename = "createTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_time: Option<i64>,

    /// 更新时间
    #[serde(rename = "updateTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub update_time: Option<i64>,

    /// 软件版本
    #[serde(rename = "softwareVersion")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub software_version: Option<String>,

    /// 缺陷级别
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "level")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub level: Option<String>,

    /// 优先级
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "priority")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub priority: Option<String>,

}


impl BugInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> BugInfo {
        BugInfo {
            bug_id: None,
            title: None,
            state: None,
            create_user_id: None,
            create_display_name: None,
            exec_user_id: None,
            exec_display_name: None,
            check_user_id: None,
            check_display_name: None,
            exec_award_point: None,
            check_award_point: None,
            create_time: None,
            update_time: None,
            software_version: None,
            level: None,
            priority: None,
        }
    }
}

/// Converts the BugInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for BugInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.bug_id.as_ref().map(|bug_id| {
                [
                    "bugId".to_string(),
                    bug_id.to_string(),
                ].join(",")
            }),


            self.title.as_ref().map(|title| {
                [
                    "title".to_string(),
                    title.to_string(),
                ].join(",")
            }),


            self.state.as_ref().map(|state| {
                [
                    "state".to_string(),
                    state.to_string(),
                ].join(",")
            }),


            self.create_user_id.as_ref().map(|create_user_id| {
                [
                    "createUserId".to_string(),
                    create_user_id.to_string(),
                ].join(",")
            }),


            self.create_display_name.as_ref().map(|create_display_name| {
                [
                    "createDisplayName".to_string(),
                    create_display_name.to_string(),
                ].join(",")
            }),


            self.exec_user_id.as_ref().map(|exec_user_id| {
                [
                    "execUserId".to_string(),
                    exec_user_id.to_string(),
                ].join(",")
            }),


            self.exec_display_name.as_ref().map(|exec_display_name| {
                [
                    "execDisplayName".to_string(),
                    exec_display_name.to_string(),
                ].join(",")
            }),


            self.check_user_id.as_ref().map(|check_user_id| {
                [
                    "checkUserId".to_string(),
                    check_user_id.to_string(),
                ].join(",")
            }),


            self.check_display_name.as_ref().map(|check_display_name| {
                [
                    "checkDisplayName".to_string(),
                    check_display_name.to_string(),
                ].join(",")
            }),


            self.exec_award_point.as_ref().map(|exec_award_point| {
                [
                    "execAwardPoint".to_string(),
                    exec_award_point.to_string(),
                ].join(",")
            }),


            self.check_award_point.as_ref().map(|check_award_point| {
                [
                    "checkAwardPoint".to_string(),
                    check_award_point.to_string(),
                ].join(",")
            }),


            self.create_time.as_ref().map(|create_time| {
                [
                    "createTime".to_string(),
                    create_time.to_string(),
                ].join(",")
            }),


            self.update_time.as_ref().map(|update_time| {
                [
                    "updateTime".to_string(),
                    update_time.to_string(),
                ].join(",")
            }),


            self.software_version.as_ref().map(|software_version| {
                [
                    "softwareVersion".to_string(),
                    software_version.to_string(),
                ].join(",")
            }),


            self.level.as_ref().map(|level| {
                [
                    "level".to_string(),
                    level.to_string(),
                ].join(",")
            }),


            self.priority.as_ref().map(|priority| {
                [
                    "priority".to_string(),
                    priority.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a BugInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for BugInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub bug_id: Vec<String>,
            pub title: Vec<String>,
            pub state: Vec<String>,
            pub create_user_id: Vec<String>,
            pub create_display_name: Vec<String>,
            pub exec_user_id: Vec<String>,
            pub exec_display_name: Vec<String>,
            pub check_user_id: Vec<String>,
            pub check_display_name: Vec<String>,
            pub exec_award_point: Vec<u32>,
            pub check_award_point: Vec<u32>,
            pub create_time: Vec<i64>,
            pub update_time: Vec<i64>,
            pub software_version: Vec<String>,
            pub level: Vec<String>,
            pub priority: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing BugInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "bugId" => intermediate_rep.bug_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "title" => intermediate_rep.title.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "state" => intermediate_rep.state.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createUserId" => intermediate_rep.create_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createDisplayName" => intermediate_rep.create_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execUserId" => intermediate_rep.exec_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execDisplayName" => intermediate_rep.exec_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkUserId" => intermediate_rep.check_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkDisplayName" => intermediate_rep.check_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execAwardPoint" => intermediate_rep.exec_award_point.push(<u32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkAwardPoint" => intermediate_rep.check_award_point.push(<u32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createTime" => intermediate_rep.create_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "updateTime" => intermediate_rep.update_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "softwareVersion" => intermediate_rep.software_version.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "level" => intermediate_rep.level.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "priority" => intermediate_rep.priority.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing BugInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(BugInfo {
            bug_id: intermediate_rep.bug_id.into_iter().next(),
            title: intermediate_rep.title.into_iter().next(),
            state: intermediate_rep.state.into_iter().next(),
            create_user_id: intermediate_rep.create_user_id.into_iter().next(),
            create_display_name: intermediate_rep.create_display_name.into_iter().next(),
            exec_user_id: intermediate_rep.exec_user_id.into_iter().next(),
            exec_display_name: intermediate_rep.exec_display_name.into_iter().next(),
            check_user_id: intermediate_rep.check_user_id.into_iter().next(),
            check_display_name: intermediate_rep.check_display_name.into_iter().next(),
            exec_award_point: intermediate_rep.exec_award_point.into_iter().next(),
            check_award_point: intermediate_rep.check_award_point.into_iter().next(),
            create_time: intermediate_rep.create_time.into_iter().next(),
            update_time: intermediate_rep.update_time.into_iter().next(),
            software_version: intermediate_rep.software_version.into_iter().next(),
            level: intermediate_rep.level.into_iter().next(),
            priority: intermediate_rep.priority.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<BugInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<BugInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<BugInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for BugInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<BugInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <BugInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into BugInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct CodeCommentInfo {
    /// 代码评论ID
    #[serde(rename = "commentId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub comment_id: Option<String>,

    /// 代码评论会话ID
    #[serde(rename = "threadId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub thread_id: Option<String>,

    /// 内容类型
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "contentType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub content_type: Option<String>,

    /// 内容
    #[serde(rename = "content")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub content: Option<String>,

    /// 用户ID
    #[serde(rename = "userId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub user_id: Option<String>,

    /// 用户名称
    #[serde(rename = "userDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub user_display_name: Option<String>,

    /// 创建时间
    #[serde(rename = "createTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_time: Option<i64>,

    /// 更新时间
    #[serde(rename = "updateTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub update_time: Option<i64>,

    /// 是否可以更新
    #[serde(rename = "canUpdate")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub can_update: Option<bool>,

    /// 是否可以删除
    #[serde(rename = "canRemove")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub can_remove: Option<bool>,

}


impl CodeCommentInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> CodeCommentInfo {
        CodeCommentInfo {
            comment_id: None,
            thread_id: None,
            content_type: None,
            content: None,
            user_id: None,
            user_display_name: None,
            create_time: None,
            update_time: None,
            can_update: None,
            can_remove: None,
        }
    }
}

/// Converts the CodeCommentInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for CodeCommentInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.comment_id.as_ref().map(|comment_id| {
                [
                    "commentId".to_string(),
                    comment_id.to_string(),
                ].join(",")
            }),


            self.thread_id.as_ref().map(|thread_id| {
                [
                    "threadId".to_string(),
                    thread_id.to_string(),
                ].join(",")
            }),


            self.content_type.as_ref().map(|content_type| {
                [
                    "contentType".to_string(),
                    content_type.to_string(),
                ].join(",")
            }),


            self.content.as_ref().map(|content| {
                [
                    "content".to_string(),
                    content.to_string(),
                ].join(",")
            }),


            self.user_id.as_ref().map(|user_id| {
                [
                    "userId".to_string(),
                    user_id.to_string(),
                ].join(",")
            }),


            self.user_display_name.as_ref().map(|user_display_name| {
                [
                    "userDisplayName".to_string(),
                    user_display_name.to_string(),
                ].join(",")
            }),


            self.create_time.as_ref().map(|create_time| {
                [
                    "createTime".to_string(),
                    create_time.to_string(),
                ].join(",")
            }),


            self.update_time.as_ref().map(|update_time| {
                [
                    "updateTime".to_string(),
                    update_time.to_string(),
                ].join(",")
            }),


            self.can_update.as_ref().map(|can_update| {
                [
                    "canUpdate".to_string(),
                    can_update.to_string(),
                ].join(",")
            }),


            self.can_remove.as_ref().map(|can_remove| {
                [
                    "canRemove".to_string(),
                    can_remove.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a CodeCommentInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for CodeCommentInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub comment_id: Vec<String>,
            pub thread_id: Vec<String>,
            pub content_type: Vec<String>,
            pub content: Vec<String>,
            pub user_id: Vec<String>,
            pub user_display_name: Vec<String>,
            pub create_time: Vec<i64>,
            pub update_time: Vec<i64>,
            pub can_update: Vec<bool>,
            pub can_remove: Vec<bool>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing CodeCommentInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "commentId" => intermediate_rep.comment_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "threadId" => intermediate_rep.thread_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "contentType" => intermediate_rep.content_type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "content" => intermediate_rep.content.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "userId" => intermediate_rep.user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "userDisplayName" => intermediate_rep.user_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createTime" => intermediate_rep.create_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "updateTime" => intermediate_rep.update_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "canUpdate" => intermediate_rep.can_update.push(<bool as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "canRemove" => intermediate_rep.can_remove.push(<bool as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing CodeCommentInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(CodeCommentInfo {
            comment_id: intermediate_rep.comment_id.into_iter().next(),
            thread_id: intermediate_rep.thread_id.into_iter().next(),
            content_type: intermediate_rep.content_type.into_iter().next(),
            content: intermediate_rep.content.into_iter().next(),
            user_id: intermediate_rep.user_id.into_iter().next(),
            user_display_name: intermediate_rep.user_display_name.into_iter().next(),
            create_time: intermediate_rep.create_time.into_iter().next(),
            update_time: intermediate_rep.update_time.into_iter().next(),
            can_update: intermediate_rep.can_update.into_iter().next(),
            can_remove: intermediate_rep.can_remove.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<CodeCommentInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<CodeCommentInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<CodeCommentInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for CodeCommentInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<CodeCommentInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <CodeCommentInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into CodeCommentInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct EntryInfo {
    /// 入口或目录ID
    #[serde(rename = "entryOrFolderId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub entry_or_folder_id: Option<String>,

    /// 类型
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "type")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub r#type: Option<String>,

    /// 标题
    #[serde(rename = "title")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub title: Option<String>,

    /// 创建人ID
    #[serde(rename = "createUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_user_id: Option<String>,

    /// 创建人名称
    #[serde(rename = "createDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_display_name: Option<String>,

    /// 创建时间
    #[serde(rename = "createTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_time: Option<i64>,

}


impl EntryInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> EntryInfo {
        EntryInfo {
            entry_or_folder_id: None,
            r#type: None,
            title: None,
            create_user_id: None,
            create_display_name: None,
            create_time: None,
        }
    }
}

/// Converts the EntryInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for EntryInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.entry_or_folder_id.as_ref().map(|entry_or_folder_id| {
                [
                    "entryOrFolderId".to_string(),
                    entry_or_folder_id.to_string(),
                ].join(",")
            }),


            self.r#type.as_ref().map(|r#type| {
                [
                    "type".to_string(),
                    r#type.to_string(),
                ].join(",")
            }),


            self.title.as_ref().map(|title| {
                [
                    "title".to_string(),
                    title.to_string(),
                ].join(",")
            }),


            self.create_user_id.as_ref().map(|create_user_id| {
                [
                    "createUserId".to_string(),
                    create_user_id.to_string(),
                ].join(",")
            }),


            self.create_display_name.as_ref().map(|create_display_name| {
                [
                    "createDisplayName".to_string(),
                    create_display_name.to_string(),
                ].join(",")
            }),


            self.create_time.as_ref().map(|create_time| {
                [
                    "createTime".to_string(),
                    create_time.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a EntryInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for EntryInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub entry_or_folder_id: Vec<String>,
            pub r#type: Vec<String>,
            pub title: Vec<String>,
            pub create_user_id: Vec<String>,
            pub create_display_name: Vec<String>,
            pub create_time: Vec<i64>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing EntryInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "entryOrFolderId" => intermediate_rep.entry_or_folder_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "type" => intermediate_rep.r#type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "title" => intermediate_rep.title.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createUserId" => intermediate_rep.create_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createDisplayName" => intermediate_rep.create_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createTime" => intermediate_rep.create_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing EntryInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(EntryInfo {
            entry_or_folder_id: intermediate_rep.entry_or_folder_id.into_iter().next(),
            r#type: intermediate_rep.r#type.into_iter().next(),
            title: intermediate_rep.title.into_iter().next(),
            create_user_id: intermediate_rep.create_user_id.into_iter().next(),
            create_display_name: intermediate_rep.create_display_name.into_iter().next(),
            create_time: intermediate_rep.create_time.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<EntryInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<EntryInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<EntryInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for EntryInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<EntryInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <EntryInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into EntryInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ErrInfo {
    /// 错误信息
    #[serde(rename = "errMsg")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub err_msg: Option<String>,

}


impl ErrInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ErrInfo {
        ErrInfo {
            err_msg: None,
        }
    }
}

/// Converts the ErrInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ErrInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.err_msg.as_ref().map(|err_msg| {
                [
                    "errMsg".to_string(),
                    err_msg.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ErrInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ErrInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub err_msg: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ErrInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "errMsg" => intermediate_rep.err_msg.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing ErrInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ErrInfo {
            err_msg: intermediate_rep.err_msg.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ErrInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ErrInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ErrInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ErrInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ErrInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ErrInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ErrInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct EventInfo {
    /// 事件ID
    #[serde(rename = "eventId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub event_id: Option<String>,

    /// 事件相关用户ID
    #[serde(rename = "userId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub user_id: Option<String>,

    /// 用户名称
    #[serde(rename = "userDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub user_display_name: Option<String>,

    /// 事件类型
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "eventType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub event_type: Option<String>,

    /// 事件关联类型
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "refType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub ref_type: Option<String>,

    /// 事件关联ID
    #[serde(rename = "refId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub ref_id: Option<String>,

    /// 事件事件
    #[serde(rename = "eventTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub event_time: Option<i64>,

    /// 事件内容
    #[serde(rename = "eventData")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub event_data: Option<serde_json::Value>,

}


impl EventInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> EventInfo {
        EventInfo {
            event_id: None,
            user_id: None,
            user_display_name: None,
            event_type: None,
            ref_type: None,
            ref_id: None,
            event_time: None,
            event_data: None,
        }
    }
}

/// Converts the EventInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for EventInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.event_id.as_ref().map(|event_id| {
                [
                    "eventId".to_string(),
                    event_id.to_string(),
                ].join(",")
            }),


            self.user_id.as_ref().map(|user_id| {
                [
                    "userId".to_string(),
                    user_id.to_string(),
                ].join(",")
            }),


            self.user_display_name.as_ref().map(|user_display_name| {
                [
                    "userDisplayName".to_string(),
                    user_display_name.to_string(),
                ].join(",")
            }),


            self.event_type.as_ref().map(|event_type| {
                [
                    "eventType".to_string(),
                    event_type.to_string(),
                ].join(",")
            }),


            self.ref_type.as_ref().map(|ref_type| {
                [
                    "refType".to_string(),
                    ref_type.to_string(),
                ].join(",")
            }),


            self.ref_id.as_ref().map(|ref_id| {
                [
                    "refId".to_string(),
                    ref_id.to_string(),
                ].join(",")
            }),


            self.event_time.as_ref().map(|event_time| {
                [
                    "eventTime".to_string(),
                    event_time.to_string(),
                ].join(",")
            }),

            // Skipping eventData in query parameter serialization

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a EventInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for EventInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub event_id: Vec<String>,
            pub user_id: Vec<String>,
            pub user_display_name: Vec<String>,
            pub event_type: Vec<String>,
            pub ref_type: Vec<String>,
            pub ref_id: Vec<String>,
            pub event_time: Vec<i64>,
            pub event_data: Vec<serde_json::Value>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing EventInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "eventId" => intermediate_rep.event_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "userId" => intermediate_rep.user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "userDisplayName" => intermediate_rep.user_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "eventType" => intermediate_rep.event_type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "refType" => intermediate_rep.ref_type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "refId" => intermediate_rep.ref_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "eventTime" => intermediate_rep.event_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "eventData" => intermediate_rep.event_data.push(<serde_json::Value as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing EventInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(EventInfo {
            event_id: intermediate_rep.event_id.into_iter().next(),
            user_id: intermediate_rep.user_id.into_iter().next(),
            user_display_name: intermediate_rep.user_display_name.into_iter().next(),
            event_type: intermediate_rep.event_type.into_iter().next(),
            ref_type: intermediate_rep.ref_type.into_iter().next(),
            ref_id: intermediate_rep.ref_id.into_iter().next(),
            event_time: intermediate_rep.event_time.into_iter().next(),
            event_data: intermediate_rep.event_data.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<EventInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<EventInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<EventInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for EventInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<EventInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <EventInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into EventInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct IssueInfo {
    /// 工单ID
    #[serde(rename = "issueId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub issue_id: Option<String>,

    /// 工单类型
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "issueType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub issue_type: Option<String>,

    /// 标题
    #[serde(rename = "title")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub title: Option<String>,

    /// 状态
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "state")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub state: Option<String>,

    /// 创建人ID
    #[serde(rename = "createUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_user_id: Option<String>,

    /// 创建人名称
    #[serde(rename = "createDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_display_name: Option<String>,

    /// 执行人ID
    #[serde(rename = "execUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_user_id: Option<String>,

    /// 执行人名称
    #[serde(rename = "execDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_display_name: Option<String>,

    /// 检查人ID
    #[serde(rename = "checkUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_user_id: Option<String>,

    /// 检查人名称
    #[serde(rename = "checkDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_display_name: Option<String>,

    /// 执行奖励
    #[serde(rename = "execAwardPoint")]
    #[validate(
            range(min = 0),
        )]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_award_point: Option<u32>,

    /// 检查奖励
    #[serde(rename = "checkAwardPoint")]
    #[validate(
            range(min = 0),
        )]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_award_point: Option<u32>,

    /// 创建时间
    #[serde(rename = "createTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_time: Option<i64>,

    /// 更新时间
    #[serde(rename = "updateTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub update_time: Option<i64>,

}


impl IssueInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> IssueInfo {
        IssueInfo {
            issue_id: None,
            issue_type: None,
            title: None,
            state: None,
            create_user_id: None,
            create_display_name: None,
            exec_user_id: None,
            exec_display_name: None,
            check_user_id: None,
            check_display_name: None,
            exec_award_point: None,
            check_award_point: None,
            create_time: None,
            update_time: None,
        }
    }
}

/// Converts the IssueInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for IssueInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.issue_id.as_ref().map(|issue_id| {
                [
                    "issueId".to_string(),
                    issue_id.to_string(),
                ].join(",")
            }),


            self.issue_type.as_ref().map(|issue_type| {
                [
                    "issueType".to_string(),
                    issue_type.to_string(),
                ].join(",")
            }),


            self.title.as_ref().map(|title| {
                [
                    "title".to_string(),
                    title.to_string(),
                ].join(",")
            }),


            self.state.as_ref().map(|state| {
                [
                    "state".to_string(),
                    state.to_string(),
                ].join(",")
            }),


            self.create_user_id.as_ref().map(|create_user_id| {
                [
                    "createUserId".to_string(),
                    create_user_id.to_string(),
                ].join(",")
            }),


            self.create_display_name.as_ref().map(|create_display_name| {
                [
                    "createDisplayName".to_string(),
                    create_display_name.to_string(),
                ].join(",")
            }),


            self.exec_user_id.as_ref().map(|exec_user_id| {
                [
                    "execUserId".to_string(),
                    exec_user_id.to_string(),
                ].join(",")
            }),


            self.exec_display_name.as_ref().map(|exec_display_name| {
                [
                    "execDisplayName".to_string(),
                    exec_display_name.to_string(),
                ].join(",")
            }),


            self.check_user_id.as_ref().map(|check_user_id| {
                [
                    "checkUserId".to_string(),
                    check_user_id.to_string(),
                ].join(",")
            }),


            self.check_display_name.as_ref().map(|check_display_name| {
                [
                    "checkDisplayName".to_string(),
                    check_display_name.to_string(),
                ].join(",")
            }),


            self.exec_award_point.as_ref().map(|exec_award_point| {
                [
                    "execAwardPoint".to_string(),
                    exec_award_point.to_string(),
                ].join(",")
            }),


            self.check_award_point.as_ref().map(|check_award_point| {
                [
                    "checkAwardPoint".to_string(),
                    check_award_point.to_string(),
                ].join(",")
            }),


            self.create_time.as_ref().map(|create_time| {
                [
                    "createTime".to_string(),
                    create_time.to_string(),
                ].join(",")
            }),


            self.update_time.as_ref().map(|update_time| {
                [
                    "updateTime".to_string(),
                    update_time.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a IssueInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for IssueInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub issue_id: Vec<String>,
            pub issue_type: Vec<String>,
            pub title: Vec<String>,
            pub state: Vec<String>,
            pub create_user_id: Vec<String>,
            pub create_display_name: Vec<String>,
            pub exec_user_id: Vec<String>,
            pub exec_display_name: Vec<String>,
            pub check_user_id: Vec<String>,
            pub check_display_name: Vec<String>,
            pub exec_award_point: Vec<u32>,
            pub check_award_point: Vec<u32>,
            pub create_time: Vec<i64>,
            pub update_time: Vec<i64>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing IssueInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "issueId" => intermediate_rep.issue_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "issueType" => intermediate_rep.issue_type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "title" => intermediate_rep.title.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "state" => intermediate_rep.state.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createUserId" => intermediate_rep.create_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createDisplayName" => intermediate_rep.create_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execUserId" => intermediate_rep.exec_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execDisplayName" => intermediate_rep.exec_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkUserId" => intermediate_rep.check_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkDisplayName" => intermediate_rep.check_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execAwardPoint" => intermediate_rep.exec_award_point.push(<u32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkAwardPoint" => intermediate_rep.check_award_point.push(<u32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createTime" => intermediate_rep.create_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "updateTime" => intermediate_rep.update_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing IssueInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(IssueInfo {
            issue_id: intermediate_rep.issue_id.into_iter().next(),
            issue_type: intermediate_rep.issue_type.into_iter().next(),
            title: intermediate_rep.title.into_iter().next(),
            state: intermediate_rep.state.into_iter().next(),
            create_user_id: intermediate_rep.create_user_id.into_iter().next(),
            create_display_name: intermediate_rep.create_display_name.into_iter().next(),
            exec_user_id: intermediate_rep.exec_user_id.into_iter().next(),
            exec_display_name: intermediate_rep.exec_display_name.into_iter().next(),
            check_user_id: intermediate_rep.check_user_id.into_iter().next(),
            check_display_name: intermediate_rep.check_display_name.into_iter().next(),
            exec_award_point: intermediate_rep.exec_award_point.into_iter().next(),
            check_award_point: intermediate_rep.check_award_point.into_iter().next(),
            create_time: intermediate_rep.create_time.into_iter().next(),
            update_time: intermediate_rep.update_time.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<IssueInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<IssueInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<IssueInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for IssueInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<IssueInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <IssueInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into IssueInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct MinappInfo {
    /// 微应用ID
    #[serde(rename = "minappId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub minapp_id: Option<String>,

    /// 微应用名称
    #[serde(rename = "minappName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub minapp_name: Option<String>,

}


impl MinappInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> MinappInfo {
        MinappInfo {
            minapp_id: None,
            minapp_name: None,
        }
    }
}

/// Converts the MinappInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for MinappInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.minapp_id.as_ref().map(|minapp_id| {
                [
                    "minappId".to_string(),
                    minapp_id.to_string(),
                ].join(",")
            }),


            self.minapp_name.as_ref().map(|minapp_name| {
                [
                    "minappName".to_string(),
                    minapp_name.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a MinappInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for MinappInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub minapp_id: Vec<String>,
            pub minapp_name: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing MinappInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "minappId" => intermediate_rep.minapp_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "minappName" => intermediate_rep.minapp_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing MinappInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(MinappInfo {
            minapp_id: intermediate_rep.minapp_id.into_iter().next(),
            minapp_name: intermediate_rep.minapp_name.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<MinappInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<MinappInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<MinappInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for MinappInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<MinappInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <MinappInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into MinappInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectInfo {
    /// 项目ID
    #[serde(rename = "projectId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub project_id: Option<String>,

    /// 项目名称
    #[serde(rename = "projectName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub project_name: Option<String>,

}


impl ProjectInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectInfo {
        ProjectInfo {
            project_id: None,
            project_name: None,
        }
    }
}

/// Converts the ProjectInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.project_id.as_ref().map(|project_id| {
                [
                    "projectId".to_string(),
                    project_id.to_string(),
                ].join(",")
            }),


            self.project_name.as_ref().map(|project_name| {
                [
                    "projectName".to_string(),
                    project_name.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub project_id: Vec<String>,
            pub project_name: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "projectId" => intermediate_rep.project_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "projectName" => intermediate_rep.project_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectInfo {
            project_id: intermediate_rep.project_id.into_iter().next(),
            project_name: intermediate_rep.project_name.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdBugAllGet200Response {
    /// 缺陷总数量
    #[serde(rename = "totalCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub total_count: Option<i32>,

    #[serde(rename = "bugList")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub bug_list: Option<Vec<models::BugInfo>>,

}


impl ProjectProjectIdBugAllGet200Response {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdBugAllGet200Response {
        ProjectProjectIdBugAllGet200Response {
            total_count: None,
            bug_list: None,
        }
    }
}

/// Converts the ProjectProjectIdBugAllGet200Response value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdBugAllGet200Response {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.total_count.as_ref().map(|total_count| {
                [
                    "totalCount".to_string(),
                    total_count.to_string(),
                ].join(",")
            }),

            // Skipping bugList in query parameter serialization

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdBugAllGet200Response value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdBugAllGet200Response {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub total_count: Vec<i32>,
            pub bug_list: Vec<Vec<models::BugInfo>>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdBugAllGet200Response".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "totalCount" => intermediate_rep.total_count.push(<i32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    "bugList" => return std::result::Result::Err("Parsing a container in this style is not supported in ProjectProjectIdBugAllGet200Response".to_string()),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdBugAllGet200Response".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdBugAllGet200Response {
            total_count: intermediate_rep.total_count.into_iter().next(),
            bug_list: intermediate_rep.bug_list.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdBugAllGet200Response> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdBugAllGet200Response>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdBugAllGet200Response>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdBugAllGet200Response - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdBugAllGet200Response> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdBugAllGet200Response as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdBugAllGet200Response - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
    /// 代码评论ID
    #[serde(rename = "commentId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub comment_id: Option<String>,

}


impl ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
        ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
            comment_id: None,
        }
    }
}

/// Converts the ProjectProjectIdCodeCommentCommentThreadIdPut200Response value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.comment_id.as_ref().map(|comment_id| {
                [
                    "commentId".to_string(),
                    comment_id.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdCodeCommentCommentThreadIdPut200Response value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub comment_id: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdCodeCommentCommentThreadIdPut200Response".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "commentId" => intermediate_rep.comment_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdCodeCommentCommentThreadIdPut200Response".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdCodeCommentCommentThreadIdPut200Response {
            comment_id: intermediate_rep.comment_id.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPut200Response> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPut200Response>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPut200Response>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdCodeCommentCommentThreadIdPut200Response - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPut200Response> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdCodeCommentCommentThreadIdPut200Response as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdCodeCommentCommentThreadIdPut200Response - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
    /// 内容类型
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "contentType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub content_type: Option<String>,

    /// 内容
    #[serde(rename = "content")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub content: Option<String>,

}


impl ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
        ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
            content_type: None,
            content: None,
        }
    }
}

/// Converts the ProjectProjectIdCodeCommentCommentThreadIdPutRequest value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.content_type.as_ref().map(|content_type| {
                [
                    "contentType".to_string(),
                    content_type.to_string(),
                ].join(",")
            }),


            self.content.as_ref().map(|content| {
                [
                    "content".to_string(),
                    content.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdCodeCommentCommentThreadIdPutRequest value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub content_type: Vec<String>,
            pub content: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdCodeCommentCommentThreadIdPutRequest".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "contentType" => intermediate_rep.content_type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "content" => intermediate_rep.content.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdCodeCommentCommentThreadIdPutRequest".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdCodeCommentCommentThreadIdPutRequest {
            content_type: intermediate_rep.content_type.into_iter().next(),
            content: intermediate_rep.content.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPutRequest> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPutRequest>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPutRequest>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdCodeCommentCommentThreadIdPutRequest - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdCodeCommentCommentThreadIdPutRequest> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdCodeCommentCommentThreadIdPutRequest as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdCodeCommentCommentThreadIdPutRequest - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdEventGet200Response {
    /// 事件总数量
    #[serde(rename = "totalCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub total_count: Option<i32>,

    #[serde(rename = "eventList")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub event_list: Option<Vec<models::EventInfo>>,

}


impl ProjectProjectIdEventGet200Response {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdEventGet200Response {
        ProjectProjectIdEventGet200Response {
            total_count: None,
            event_list: None,
        }
    }
}

/// Converts the ProjectProjectIdEventGet200Response value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdEventGet200Response {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.total_count.as_ref().map(|total_count| {
                [
                    "totalCount".to_string(),
                    total_count.to_string(),
                ].join(",")
            }),

            // Skipping eventList in query parameter serialization

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdEventGet200Response value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdEventGet200Response {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub total_count: Vec<i32>,
            pub event_list: Vec<Vec<models::EventInfo>>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdEventGet200Response".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "totalCount" => intermediate_rep.total_count.push(<i32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    "eventList" => return std::result::Result::Err("Parsing a container in this style is not supported in ProjectProjectIdEventGet200Response".to_string()),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdEventGet200Response".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdEventGet200Response {
            total_count: intermediate_rep.total_count.into_iter().next(),
            event_list: intermediate_rep.event_list.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdEventGet200Response> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdEventGet200Response>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdEventGet200Response>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdEventGet200Response - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdEventGet200Response> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdEventGet200Response as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdEventGet200Response - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdEventPostRequest {
    /// 自定义事件类型
    #[serde(rename = "evType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub ev_type: Option<String>,

    /// 自定义事件内容
    #[serde(rename = "evContent")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub ev_content: Option<String>,

}


impl ProjectProjectIdEventPostRequest {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdEventPostRequest {
        ProjectProjectIdEventPostRequest {
            ev_type: None,
            ev_content: None,
        }
    }
}

/// Converts the ProjectProjectIdEventPostRequest value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdEventPostRequest {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.ev_type.as_ref().map(|ev_type| {
                [
                    "evType".to_string(),
                    ev_type.to_string(),
                ].join(",")
            }),


            self.ev_content.as_ref().map(|ev_content| {
                [
                    "evContent".to_string(),
                    ev_content.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdEventPostRequest value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdEventPostRequest {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub ev_type: Vec<String>,
            pub ev_content: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdEventPostRequest".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "evType" => intermediate_rep.ev_type.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "evContent" => intermediate_rep.ev_content.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdEventPostRequest".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdEventPostRequest {
            ev_type: intermediate_rep.ev_type.into_iter().next(),
            ev_content: intermediate_rep.ev_content.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdEventPostRequest> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdEventPostRequest>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdEventPostRequest>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdEventPostRequest - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdEventPostRequest> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdEventPostRequest as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdEventPostRequest - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdTaskAllGet200Response {
    /// 任务总数量
    #[serde(rename = "totalCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub total_count: Option<i32>,

    #[serde(rename = "taskList")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub task_list: Option<Vec<models::TaskInfo>>,

}


impl ProjectProjectIdTaskAllGet200Response {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdTaskAllGet200Response {
        ProjectProjectIdTaskAllGet200Response {
            total_count: None,
            task_list: None,
        }
    }
}

/// Converts the ProjectProjectIdTaskAllGet200Response value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdTaskAllGet200Response {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.total_count.as_ref().map(|total_count| {
                [
                    "totalCount".to_string(),
                    total_count.to_string(),
                ].join(",")
            }),

            // Skipping taskList in query parameter serialization

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdTaskAllGet200Response value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdTaskAllGet200Response {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub total_count: Vec<i32>,
            pub task_list: Vec<Vec<models::TaskInfo>>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdTaskAllGet200Response".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "totalCount" => intermediate_rep.total_count.push(<i32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    "taskList" => return std::result::Result::Err("Parsing a container in this style is not supported in ProjectProjectIdTaskAllGet200Response".to_string()),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdTaskAllGet200Response".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdTaskAllGet200Response {
            total_count: intermediate_rep.total_count.into_iter().next(),
            task_list: intermediate_rep.task_list.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdTaskAllGet200Response> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdTaskAllGet200Response>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdTaskAllGet200Response>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdTaskAllGet200Response - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdTaskAllGet200Response> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdTaskAllGet200Response as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdTaskAllGet200Response - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct ProjectProjectIdTaskRecordTaskIdDependGet200Response {
    #[serde(rename = "myDependList")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub my_depend_list: Option<Vec<models::IssueInfo>>,

    #[serde(rename = "dependMeList")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub depend_me_list: Option<Vec<models::IssueInfo>>,

}


impl ProjectProjectIdTaskRecordTaskIdDependGet200Response {
    #[allow(clippy::new_without_default)]
    pub fn new() -> ProjectProjectIdTaskRecordTaskIdDependGet200Response {
        ProjectProjectIdTaskRecordTaskIdDependGet200Response {
            my_depend_list: None,
            depend_me_list: None,
        }
    }
}

/// Converts the ProjectProjectIdTaskRecordTaskIdDependGet200Response value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for ProjectProjectIdTaskRecordTaskIdDependGet200Response {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![
            // Skipping myDependList in query parameter serialization

            // Skipping dependMeList in query parameter serialization

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a ProjectProjectIdTaskRecordTaskIdDependGet200Response value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for ProjectProjectIdTaskRecordTaskIdDependGet200Response {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub my_depend_list: Vec<Vec<models::IssueInfo>>,
            pub depend_me_list: Vec<Vec<models::IssueInfo>>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing ProjectProjectIdTaskRecordTaskIdDependGet200Response".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    "myDependList" => return std::result::Result::Err("Parsing a container in this style is not supported in ProjectProjectIdTaskRecordTaskIdDependGet200Response".to_string()),
                    "dependMeList" => return std::result::Result::Err("Parsing a container in this style is not supported in ProjectProjectIdTaskRecordTaskIdDependGet200Response".to_string()),
                    _ => return std::result::Result::Err("Unexpected key while parsing ProjectProjectIdTaskRecordTaskIdDependGet200Response".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(ProjectProjectIdTaskRecordTaskIdDependGet200Response {
            my_depend_list: intermediate_rep.my_depend_list.into_iter().next(),
            depend_me_list: intermediate_rep.depend_me_list.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<ProjectProjectIdTaskRecordTaskIdDependGet200Response> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<ProjectProjectIdTaskRecordTaskIdDependGet200Response>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<ProjectProjectIdTaskRecordTaskIdDependGet200Response>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for ProjectProjectIdTaskRecordTaskIdDependGet200Response - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ProjectProjectIdTaskRecordTaskIdDependGet200Response> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <ProjectProjectIdTaskRecordTaskIdDependGet200Response as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into ProjectProjectIdTaskRecordTaskIdDependGet200Response - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct SubTaskInfo {
    /// 子任务ID
    #[serde(rename = "subTaskId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub sub_task_id: Option<String>,

    /// 任务ID
    #[serde(rename = "taskId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub task_id: Option<String>,

    /// 标题
    #[serde(rename = "title")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub title: Option<String>,

    /// 创建人ID
    #[serde(rename = "createUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_user_id: Option<String>,

    /// 创建人名称
    #[serde(rename = "createDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_display_name: Option<String>,

    /// 是否完成
    #[serde(rename = "done")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub done: Option<bool>,

    /// 创建时间
    #[serde(rename = "createTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_time: Option<i64>,

    /// 更新时间
    #[serde(rename = "updateTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub update_time: Option<i64>,

}


impl SubTaskInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> SubTaskInfo {
        SubTaskInfo {
            sub_task_id: None,
            task_id: None,
            title: None,
            create_user_id: None,
            create_display_name: None,
            done: None,
            create_time: None,
            update_time: None,
        }
    }
}

/// Converts the SubTaskInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for SubTaskInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.sub_task_id.as_ref().map(|sub_task_id| {
                [
                    "subTaskId".to_string(),
                    sub_task_id.to_string(),
                ].join(",")
            }),


            self.task_id.as_ref().map(|task_id| {
                [
                    "taskId".to_string(),
                    task_id.to_string(),
                ].join(",")
            }),


            self.title.as_ref().map(|title| {
                [
                    "title".to_string(),
                    title.to_string(),
                ].join(",")
            }),


            self.create_user_id.as_ref().map(|create_user_id| {
                [
                    "createUserId".to_string(),
                    create_user_id.to_string(),
                ].join(",")
            }),


            self.create_display_name.as_ref().map(|create_display_name| {
                [
                    "createDisplayName".to_string(),
                    create_display_name.to_string(),
                ].join(",")
            }),


            self.done.as_ref().map(|done| {
                [
                    "done".to_string(),
                    done.to_string(),
                ].join(",")
            }),


            self.create_time.as_ref().map(|create_time| {
                [
                    "createTime".to_string(),
                    create_time.to_string(),
                ].join(",")
            }),


            self.update_time.as_ref().map(|update_time| {
                [
                    "updateTime".to_string(),
                    update_time.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a SubTaskInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for SubTaskInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub sub_task_id: Vec<String>,
            pub task_id: Vec<String>,
            pub title: Vec<String>,
            pub create_user_id: Vec<String>,
            pub create_display_name: Vec<String>,
            pub done: Vec<bool>,
            pub create_time: Vec<i64>,
            pub update_time: Vec<i64>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing SubTaskInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "subTaskId" => intermediate_rep.sub_task_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "taskId" => intermediate_rep.task_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "title" => intermediate_rep.title.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createUserId" => intermediate_rep.create_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createDisplayName" => intermediate_rep.create_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "done" => intermediate_rep.done.push(<bool as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createTime" => intermediate_rep.create_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "updateTime" => intermediate_rep.update_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing SubTaskInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(SubTaskInfo {
            sub_task_id: intermediate_rep.sub_task_id.into_iter().next(),
            task_id: intermediate_rep.task_id.into_iter().next(),
            title: intermediate_rep.title.into_iter().next(),
            create_user_id: intermediate_rep.create_user_id.into_iter().next(),
            create_display_name: intermediate_rep.create_display_name.into_iter().next(),
            done: intermediate_rep.done.into_iter().next(),
            create_time: intermediate_rep.create_time.into_iter().next(),
            update_time: intermediate_rep.update_time.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<SubTaskInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<SubTaskInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<SubTaskInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for SubTaskInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<SubTaskInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <SubTaskInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into SubTaskInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}


#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct TaskInfo {
    /// 任务ID
    #[serde(rename = "taskId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub task_id: Option<String>,

    /// 标题
    #[serde(rename = "title")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub title: Option<String>,

    /// 状态
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "state")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub state: Option<String>,

    /// 创建人ID
    #[serde(rename = "createUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_user_id: Option<String>,

    /// 创建人名称
    #[serde(rename = "createDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_display_name: Option<String>,

    /// 执行人ID
    #[serde(rename = "execUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_user_id: Option<String>,

    /// 执行人名称
    #[serde(rename = "execDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_display_name: Option<String>,

    /// 检查人ID
    #[serde(rename = "checkUserId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_user_id: Option<String>,

    /// 检查人名称
    #[serde(rename = "checkDisplayName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_display_name: Option<String>,

    /// 执行奖励
    #[serde(rename = "execAwardPoint")]
    #[validate(
            range(min = 0),
        )]
    #[serde(skip_serializing_if="Option::is_none")]
    pub exec_award_point: Option<u32>,

    /// 检查奖励
    #[serde(rename = "checkAwardPoint")]
    #[validate(
            range(min = 0),
        )]
    #[serde(skip_serializing_if="Option::is_none")]
    pub check_award_point: Option<u32>,

    /// 创建时间
    #[serde(rename = "createTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub create_time: Option<i64>,

    /// 更新时间
    #[serde(rename = "updateTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub update_time: Option<i64>,

    /// 优先级
    // Note: inline enums are not fully supported by openapi-generator
    #[serde(rename = "priority")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub priority: Option<String>,

}


impl TaskInfo {
    #[allow(clippy::new_without_default)]
    pub fn new() -> TaskInfo {
        TaskInfo {
            task_id: None,
            title: None,
            state: None,
            create_user_id: None,
            create_display_name: None,
            exec_user_id: None,
            exec_display_name: None,
            check_user_id: None,
            check_display_name: None,
            exec_award_point: None,
            check_award_point: None,
            create_time: None,
            update_time: None,
            priority: None,
        }
    }
}

/// Converts the TaskInfo value to the Query Parameters representation (style=form, explode=false)
/// specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde serializer
impl std::string::ToString for TaskInfo {
    fn to_string(&self) -> String {
        let params: Vec<Option<String>> = vec![

            self.task_id.as_ref().map(|task_id| {
                [
                    "taskId".to_string(),
                    task_id.to_string(),
                ].join(",")
            }),


            self.title.as_ref().map(|title| {
                [
                    "title".to_string(),
                    title.to_string(),
                ].join(",")
            }),


            self.state.as_ref().map(|state| {
                [
                    "state".to_string(),
                    state.to_string(),
                ].join(",")
            }),


            self.create_user_id.as_ref().map(|create_user_id| {
                [
                    "createUserId".to_string(),
                    create_user_id.to_string(),
                ].join(",")
            }),


            self.create_display_name.as_ref().map(|create_display_name| {
                [
                    "createDisplayName".to_string(),
                    create_display_name.to_string(),
                ].join(",")
            }),


            self.exec_user_id.as_ref().map(|exec_user_id| {
                [
                    "execUserId".to_string(),
                    exec_user_id.to_string(),
                ].join(",")
            }),


            self.exec_display_name.as_ref().map(|exec_display_name| {
                [
                    "execDisplayName".to_string(),
                    exec_display_name.to_string(),
                ].join(",")
            }),


            self.check_user_id.as_ref().map(|check_user_id| {
                [
                    "checkUserId".to_string(),
                    check_user_id.to_string(),
                ].join(",")
            }),


            self.check_display_name.as_ref().map(|check_display_name| {
                [
                    "checkDisplayName".to_string(),
                    check_display_name.to_string(),
                ].join(",")
            }),


            self.exec_award_point.as_ref().map(|exec_award_point| {
                [
                    "execAwardPoint".to_string(),
                    exec_award_point.to_string(),
                ].join(",")
            }),


            self.check_award_point.as_ref().map(|check_award_point| {
                [
                    "checkAwardPoint".to_string(),
                    check_award_point.to_string(),
                ].join(",")
            }),


            self.create_time.as_ref().map(|create_time| {
                [
                    "createTime".to_string(),
                    create_time.to_string(),
                ].join(",")
            }),


            self.update_time.as_ref().map(|update_time| {
                [
                    "updateTime".to_string(),
                    update_time.to_string(),
                ].join(",")
            }),


            self.priority.as_ref().map(|priority| {
                [
                    "priority".to_string(),
                    priority.to_string(),
                ].join(",")
            }),

        ];

        params.into_iter().flatten().collect::<Vec<_>>().join(",")
    }
}

/// Converts Query Parameters representation (style=form, explode=false) to a TaskInfo value
/// as specified in https://swagger.io/docs/specification/serialization/
/// Should be implemented in a serde deserializer
impl std::str::FromStr for TaskInfo {
    type Err = String;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        /// An intermediate representation of the struct to use for parsing.
        #[derive(Default)]
        #[allow(dead_code)]
        struct IntermediateRep {
            pub task_id: Vec<String>,
            pub title: Vec<String>,
            pub state: Vec<String>,
            pub create_user_id: Vec<String>,
            pub create_display_name: Vec<String>,
            pub exec_user_id: Vec<String>,
            pub exec_display_name: Vec<String>,
            pub check_user_id: Vec<String>,
            pub check_display_name: Vec<String>,
            pub exec_award_point: Vec<u32>,
            pub check_award_point: Vec<u32>,
            pub create_time: Vec<i64>,
            pub update_time: Vec<i64>,
            pub priority: Vec<String>,
        }

        let mut intermediate_rep = IntermediateRep::default();

        // Parse into intermediate representation
        let mut string_iter = s.split(',');
        let mut key_result = string_iter.next();

        while key_result.is_some() {
            let val = match string_iter.next() {
                Some(x) => x,
                None => return std::result::Result::Err("Missing value while parsing TaskInfo".to_string())
            };

            if let Some(key) = key_result {
                #[allow(clippy::match_single_binding)]
                match key {
                    #[allow(clippy::redundant_clone)]
                    "taskId" => intermediate_rep.task_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "title" => intermediate_rep.title.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "state" => intermediate_rep.state.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createUserId" => intermediate_rep.create_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createDisplayName" => intermediate_rep.create_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execUserId" => intermediate_rep.exec_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execDisplayName" => intermediate_rep.exec_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkUserId" => intermediate_rep.check_user_id.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkDisplayName" => intermediate_rep.check_display_name.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "execAwardPoint" => intermediate_rep.exec_award_point.push(<u32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "checkAwardPoint" => intermediate_rep.check_award_point.push(<u32 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "createTime" => intermediate_rep.create_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "updateTime" => intermediate_rep.update_time.push(<i64 as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    #[allow(clippy::redundant_clone)]
                    "priority" => intermediate_rep.priority.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
                    _ => return std::result::Result::Err("Unexpected key while parsing TaskInfo".to_string())
                }
            }

            // Get the next key
            key_result = string_iter.next();
        }

        // Use the intermediate representation to return the struct
        std::result::Result::Ok(TaskInfo {
            task_id: intermediate_rep.task_id.into_iter().next(),
            title: intermediate_rep.title.into_iter().next(),
            state: intermediate_rep.state.into_iter().next(),
            create_user_id: intermediate_rep.create_user_id.into_iter().next(),
            create_display_name: intermediate_rep.create_display_name.into_iter().next(),
            exec_user_id: intermediate_rep.exec_user_id.into_iter().next(),
            exec_display_name: intermediate_rep.exec_display_name.into_iter().next(),
            check_user_id: intermediate_rep.check_user_id.into_iter().next(),
            check_display_name: intermediate_rep.check_display_name.into_iter().next(),
            exec_award_point: intermediate_rep.exec_award_point.into_iter().next(),
            check_award_point: intermediate_rep.check_award_point.into_iter().next(),
            create_time: intermediate_rep.create_time.into_iter().next(),
            update_time: intermediate_rep.update_time.into_iter().next(),
            priority: intermediate_rep.priority.into_iter().next(),
        })
    }
}

// Methods for converting between header::IntoHeaderValue<TaskInfo> and hyper::header::HeaderValue

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<header::IntoHeaderValue<TaskInfo>> for hyper::header::HeaderValue {
    type Error = String;

    fn try_from(hdr_value: header::IntoHeaderValue<TaskInfo>) -> std::result::Result<Self, Self::Error> {
        let hdr_value = hdr_value.to_string();
        match hyper::header::HeaderValue::from_str(&hdr_value) {
             std::result::Result::Ok(value) => std::result::Result::Ok(value),
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Invalid header value for TaskInfo - value: {} is invalid {}",
                     hdr_value, e))
        }
    }
}

#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<TaskInfo> {
    type Error = String;

    fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
        match hdr_value.to_str() {
             std::result::Result::Ok(value) => {
                    match <TaskInfo as std::str::FromStr>::from_str(value) {
                        std::result::Result::Ok(value) => std::result::Result::Ok(header::IntoHeaderValue(value)),
                        std::result::Result::Err(err) => std::result::Result::Err(
                            format!("Unable to convert header value '{}' into TaskInfo - {}",
                                value, err))
                    }
             },
             std::result::Result::Err(e) => std::result::Result::Err(
                 format!("Unable to convert header: {:?} to string: {}",
                     hdr_value, e))
        }
    }
}

